package com.sgb.goods.api;

import com.sgb.goods.entity.CommitVipPrice;
import com.sgb.goods.entity.MemberPriceEntity;
import com.sgb.goods.entity.MenuEntity1;
import com.sgb.goods.entity.SkuDetail;
import com.sgb.goods.entity.VipPriceMangeListEntity;
import com.swgk.core.base.model.entity.BaseEntity;
import com.swgk.core.base.model.entity.ListResponse;

import java.util.HashMap;
import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface MemberPriceApi {

    /**
     * 获取供应商会员价格商品列表
     */
    @POST("item/member/getPageList")
    Call<BaseEntity<ListResponse<List<VipPriceMangeListEntity>>>> getMemberPriceGoodsPageList(@Body HashMap<String,Object> body);

    /**
     * 结束会员价
     */
    @POST("item/member/finishItemMemberPrice/{itemId}/{itemMemberId}")
    Call<BaseEntity> finishItemMemberPrice(@Path("itemId") long itemId, @Path("itemMemberId") long itemMemberId);

    /**
     * 再次设置权限验证
     */
    @POST("item/member/againItemMemberPrice/{itemId}/{itemMemberId}")
    Call<BaseEntity> againItemMemberPrice(@Path("itemId") long itemId, @Path("itemMemberId") long itemMemberId);

    /**
     * 设置会员价-商品列表
     */
    @POST("item/member/goods/list")
    Call<BaseEntity<ListResponse<List<VipPriceMangeListEntity>>>> getCanSetGoodsList(@Body HashMap<String,Object> body);

    /**
     * 根据商品id获取sku列表(设置商品会员价格使用)
     */
    @GET("item/member/sku/list/{itemId}")
    Call<BaseEntity> getGoodsSku(@Path("itemId") long itemId);

    /**
     * 商品分类列表
     */
    @GET("v1/app/material/buyer/goodsCategory")
    Call<BaseEntity<List<MenuEntity1<MenuEntity1<MenuEntity1>>>>> materialGoodsCategory(@Query("areaCode") String areaCode);

    /**
     * 获取会员价详情
     */
    @GET("item/member/getItemMemberDetail/{itemMemberId}/{itemId}")
    Call<BaseEntity<MemberPriceEntity>> getMemberPriceDetails(@Path("itemMemberId") long itemMemberId, @Path("itemId") long itemId);

    /**
     * 获取sku会员价详情信息
     */
    @GET("item/member/getSkuMemberPriceDetail/{itemMemberNo}/{skuId}")
    Call<BaseEntity<List<MemberPriceEntity.MemberPriceSkuDetail>>> getSkuMemberPriceDetail(@Path("itemMemberNo") long itemMemberNo, @Path("skuId") long skuId);


    /**
     * 【V1.4.9】保存会员价格
     */
    @POST("item/member/addItemMember")
    Call<BaseEntity> commitVipPrice(@Body CommitVipPrice data);

    /**
     * 根据商品id获取sku列表(设置商品会员价格使用)
     */
    @GET("item/member/sku/list/{itemId}")
    Call<BaseEntity<SkuDetail>> getSkuList(@Path("itemId") long itemId);
}
